import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login/Login.vue')
  },
  {
    path: '/dashBook',
    name: 'DashBook',
    component: () => import('../views/DashBook'),
    redirect: '/system/welcome',
    children:[
      {
        path:'/system/welcome',
        name:'Welcome',
        component: () => import('../views/system/Welcome'),
      },
      {
        path: '/system/menu-category',
        name: 'Category',
        component:() => import('../views/system/MenuCategory'),
      },
      {
        path: '/system/users',
        name: 'Users',
        component: () =>import('../views/system/Users'),
      },
      // ----------------------学员信息管理开始------------------------------
      {
        path: '/student/manage',
        name: 'StuManage',
        component: () => import('../views/student/StuManage.vue')
      }
      // -----------------------学员信息管理结束-----------------------------
      ,{
        path: '/student/class',
        name: 'ClassManage',
        component:() => import('../views/student/ClassManage')
      },
      // 年级管理
      {
        path: '/student/grade',
        name: 'GradeManage',
        component:() => import('../views/student/GradeManage')
      },
      // 成绩管理
      {
        path: '/student/mark',
        name: 'ScoreManage',
        component:() => import('../views/student/ScoreManage')
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
